Hello and welcome to this lecture in this lecture will be creating too -- mention every now will hald
information about the bricks.
The array will contain brick column information as well as the brick rolls which will also contain an
object containing the x and y position that will be used to paint or draw each brick on the screen to
save some time.
I have already created the piece of court for the two dimensional array ballads from line 22 to line
twenty eight.
The piece of code here what will happen is it contains a loop.
For now it will look through the rules columns and then create new bridge.
So let me explain.
Could to you line 22.
We created a variable or bricks and gave it a value of an empty horie Online 23 added a for loop.
An inside look.
Tool.
Check for the column to check the value of the column is zero.
And if the column is less than the brick column count which is this count 7.
If it is less than that or what different form look will do just loop through this and check if there
are they check that the cantine 0 there is no column there and any Also checks the brick column count.
But is this here.
If it is less than that.
So if it is less than that it will now add column.
If time ignores true the loop so does bloss plasmids add 1.
So you checked the loop chips.
This condition shows that the column is zero checks that the column is the less than the blue column
count.
He then adds a column.
So there are three things it looks for.
And this is where it will add that column.
Inside this empty hurry here so are the bricks.
But seeing this is the area here inside this area is the column count.
Of course to whatever increment you add online 25 is the same thing.
But this would be doing it for the rules.
It checks to see if the rules are 0 and also even the rule is less than the break rule count which is
this one here which is for is less than 4.
It will then add 1 each time it goes to a loop until he gets the total amount defined.
On line 26 again the bricks variable.
You've got the two areas here.
The one for the column.
How one fully rule.
And also may be equal to an object.
So this symbol Here's an object we defined two objects for the x y axis.
These are objects and the borgo values of zy each time the loop happens.
A tool set the X and the y position of each brick and paint or draw a brick on the compass as thong
as the count is relevant.
Right now we've created the two dimensional array.
In the next letter your will be creating a function.
There we will used to draw the outroar bricks.
Thank you so much for watching.
Bye for an hour.